﻿#ifndef TRACKEXECUTOR_H
#define TRACKEXECUTOR_H

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <ros/ros.h>

#include "kcftracker.h"


using namespace std;
using namespace cv;

typedef struct{
    int x_min;
    int y_min;
    int x_max;
    int y_max;
} rect_t;



class TrackExecutor
{
public:
    TrackExecutor();

    static void OnMouse(int event, int x, int y, int flags, void*userdata);
    void On_Mouse(int event, int x, int y);
    void RunMain();

public:
    Point       _pre_point, _last_point;
    bool        _start_drag;
    bool        _start_tarck;
    bool        _selection;
    rect_t      _rect;
    Rect        _result;
    KCFTracker  _tracker;
    Mat         _frame;
    bool        _HOG;
    bool        _FIXEDWINDOW;
    bool        _MULTISCALE;
    bool        _SILENT;
    bool        _LAB;
};

#endif // TRACKEXECUTOR_H
